#include <bits/stdc++.h>
#include<stdio.h>
#include<stdlib.h>
#include<string.h>
using namespace std;

char * reversestr(char * str){
    if(str == NULL)
      return str;
    char * begin,*end;
    begin = end =str;
    while(*end !='\0'){
        end++;
    }
    end--;
    char temp;
    while(begin<end){
        temp = *begin;
        *begin = *end;
        *end = temp;
        begin++;
        end--;
    }
    return str;
}
int main(){
    char *str = (char*)malloc(10000*sizeof(char));
    gets(str);
    cout<<reversestr(str)<<endl;
    return 0;
}
